const tableNameDict = [
	{ label: '养老服务对象数据', value: 'dp_service_object' },
	{ label: '养老机构数据', value: 'dp_service_org_base' },
	{ label: '从业人员数据', value: 'dp_foundation_practitioners' },
]
export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'right',
	labelWidth: '100px',
	column: [
		{
			label: '消息提醒时间',
			prop: 'createTimeBetween',
			type: 'dateBetween',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			span: 8,
		},
		{
			label: '标题',
			prop: 'noticeTitle',
			type: 'input',
			span: 8,
		},
		{
			label: '提醒内容',
			prop: 'noticeContent',
			type: 'input',
			span: 8,
		},
		{
			label: '消息类型',
			prop: 'tableName',
			type: 'select',
			dicData: tableNameDict,
			span: 8,
		},
		{
			label: '消息状态',
			prop: 'changeStatus',
			type: 'select',
			span: 8,
			dicData: [
				{ label: '待更新', value: 0, type: 'danger' },
				{ label: '已更新', value: 1, type: 'success' },
			],
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '消息提醒时间', prop: 'createTime' },
		{ label: '消息类型', prop: 'tableName', custome: 'tag', dicData: tableNameDict },
		{ label: '标题', prop: 'noticeTitle' },
		{
			label: '提醒内容',
			prop: 'noticeContent',
		},
		{
			label: '消息状态',
			prop: 'changeStatus',
			custome: 'tag',
			dicData: [
				{ label: '待更新', value: 0, type: 'danger' },
				{ label: '已更新', value: 1, type: 'success' },
			],
		},
		{
			label: '操作',
			prop: 'menu',
			width: 200,
			fixed: 'right',
		},
	],
}

export const selfCustomeHeader = {
	orgCustomeHeader: {
		type: 'CardOne',
		title: 'organizationName',
		avatar: 'organizationLogo',
		tipList: [{ prop: 'operateStatusLabel', type: 'tip-success', label: '运营状态' }],
		tagList: [
			{ prop: 'organizationTypeLabel', custome: 'tag', type: 'success', label: '机构类型' },
			{
				prop: 'integrity',
				type: 'success',
				label: '材料完整度',
				style: {
					background: '#1e80ff',
					padding: '2px 4px',
					borderRadius: '5px',
					fontWeight: 600,
				},
			},
		],
		menuBtn: [],
	},
	practitionerCustomeHeader: {
		integrityConfig: {
			baseTableName: 'dp_foundation_practitioners',
			materialTableName: 'dp_foundation_practitioners_material',
			soleValue: 'idCard',
		},
		type: 'CardTwo',
		title: 'practitionersName',
		avatar: 'staffPhoto',
		tipList: [{ prop: 'phone', type: 'tip-success', label: '联系电话' }],
		tagList: [
			// { prop: 'healthyStateLabel', code: 'HEALTHY_STATE', custome: 'tag', type: 'success', label: '健康状态' },
			{ prop: 'workTypeLabel', code: 'WORK_TYPE', custome: 'tag', type: 'success', label: '工作类型' },
			{ prop: 'serviceStateLabel', code: 'SERVICE_STATE', custome: 'tag', type: 'success', label: '服务状态' },
			{ prop: 'unitName', type: 'success', label: '所在单位' },
		],
		menuBtn: [
			{
				icon: 'delete',
				label: '删除从业人员',
				type: 'danger',
				operate: 'delete',
				auth: 'view_dpFoundationPractitioners_del',
				text: false,
				show: true,
				plain: true,
			},
		],
	},
	oldmanCustomeHeader: {
		integrityConfig: {
			baseTableName: 'dp_service_object',
			materialTableName: 'dp_service_object_material',
			soleValue: 'idCard',
		},
		type: 'CardTwo',
		title: 'name',
		avatar: 'image',
		tipList: [{ prop: 'telephone', type: 'tip-success', label: '联系电话' }],
		tagList: [
			{
				prop: 'countryLevel',
				propName: 'countryLevelLabel',
				code: 'ACCESS_LEVEL_COUNTRY',
				custome: 'tag',
				type: 'success',
				label: '能力等级',
			},
			{ prop: 'birthday', type: 'success', label: '公历' },
			{ prop: 'lunarBirthday', type: 'success', label: '农历' },
		],
		menuBtn: [],
	},
}
export const api = {
	index: 'view_org_notice_page',
}
export const baseConfig = {
	pageName: '消息通知',
	dictcodes: [],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'noticeTitle',
	exportMqTopic: '/ning/export/',
	api,
	auth: {
		index: 'view_org_notice_page',
	},
	menuBtn: [
		{
			icon: 'detail',
			label: '查看档案',
			type: 'primary',
			operate: 'Archives',
			auth: '',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '75%',
	},
	searchConfig,
	tableConfig,
}
